<?php require_once("verifica_zero.php"); ?>
<?php
	include_once("topoin.php");
	include_once '../classes/banco/db.class.php';
	include_once '../classes/users.control.class.php';
	include_once '../classes/cidades.control.class.php';
	include_once '../classes/estados.control.class.php';
	include_once '../classes/ocorrencia.control.class.php';
	include_once '../classes/setor1.control.class.php';
	include_once '../classes/setor2.control.class.php';
	require_once '../classes/local.control.class.php';
	
	$usersControl = new UsersControl();
	$user = $usersControl->selectUsers($_SESSION["id"]);
	
	$setor1Control = new Setor1Control();
	$setor1 = $setor1Control->selectAll();
	
	$estadosControl = new EstadosControl();
	$estado = $estadosControl->selectEstados($user[0]['FKrg_uf']);
	
	$flag = ($_GET['cat']);
	$ocorrenciaControl = new OcorrenciaControl();
	$flag_name = $ocorrenciaControl->trataFlag($flag);

?>
	<h1>CADASTRO <?php echo $flag_name ?></h1>
    <div id="f">
    	<form method="post" action="../classes/comum.php" id="formulario" name="formulario" >
        	<fieldset style="border: none;">
            	<ul>
                	<div id="oque" class="conteudo">
                        <div id="ocorrencia">
                            <li>
                                <label for="ocorrencia_FKtype">FOI <?php echo $flag_name ?> DE:</label>
                                <select id="ocorrencia_FKtype" name="FKtype" class="option">
                                    <option value="">----- Selecione -----</option>
                                    <option value="1">Cart&atilde;o de Cr&eacute;dito</option>
                                    <option value="2">Celular</option>
                                    <option value="3">Documento</option>
                                    <!--	<option value="0">Outro</option>	-->
                                </select>
                            </li>
                        </div>
                        <!--
                        <li id="ocorrencia_FKtype0">
                            <label for="FKtype_name">Especifique:</label>
                            <input type="text" id="FKtype_name" value=""/>
                        </li>
                        -->
                        <br />
                        <div id="informacoes">
                            
                            <div id="cartcred">
                                <li>
                                    <label for="cartcred_ban_ent">Banco ou Entidade:</label>
                                    <select id="cartcred_ban_ent" name="cartcred_ban_ent" class="option">
                                        <option value="">---------- Selecione ----------</option>
                                        <option value="Caixa Econ&ocirc;mica Federal">Caixa Econ&ocirc;mica Federal</option>
                                        <option value="Banco do Brasil">Banco do Brasil</option>
                                        <option value="Ita&uacute;">Ita&uacute;</option>
                                        <option value="Bradesco">Bradesco</option>
                                        <option value="Real">Real</option>
                                        <option value="0">Outro</option>
                                    </select>
                                </li>
                                <li id="cartcred_ban_ent0">
                                    <label for="cartcred_ban_ent_name">Especifique o Banco ou Entidade:</label>
                                    <input type="text" id="cartcred_ban_ent_name" value=""/>
                                </li>
                                <li>
                                    <label for="cartcred_number">N&uacute;mero do cart&atilde;o:</label>
                                    <input type="text" maxlength="12"value=""/>
                                </li>
                                <li>
                                    <label for="cartcred_name">Nome do cart&atilde;o:</label>
                                    <input type="text" maxlength="35" value=""/>
                                </li>
                            </div>
                            
                            <div id="celular">
                                <li>
                                    <label for="celular_oper">Operadora</label>
                                    <select id="celular_oper" name="celular_oper" class="option">
                                        <option value="TIM">TIM</option>
                                        <option value="Claro">Claro</option>
                                        <option value="VIVO">VIVO</option>
                                        <option value="Oi">Oi</option>
                                        <option value="Amaz&ocirc;nia Celular">Amaz&ocirc;nia Celular</option>
                                        <option value="0">Outra</option>
                                    </select>
                                </li>
                                <li id="celular_oper0">
                                    <label for="celelur_oper_name">Especifique a operadora:</label>
                                    <input type="text" id="celular_oper_name" value=""/>
                                </li>
                                <li>
                                    <label for="celular_number">N&uacute;mero:</label>
                                    <input type="text" />
                                </li>
                                <li>
                                    <label for="celular_name">Nome do Titular:</label>
                                    <input type="text" />
                                </li>
                                <li>
                                    <label for="celular_model">Modelo:</label>
                                    <input type="text" />
                                </li>
                                <li>
                                    <label for="celular_color">Cor:</label>
                                    <input type="text" />
                                </li>
                                <li>
                                    <label for="celular_marca">Marca:</label>
                                    <select id="celular_marca" name="celular_marca" class="option">
                                        <option value="">--- Selecione ---</option>
                                        <option value="Sony Ericson">Sony Ericson</option>
                                        <option value="Nokia">Nokia</option>
                                        <option value="LG Mobile">LG Mobile</option>
                                        <option value="Motorola">Motorola</option>
                                        <option value="0">Outra</option>
                                    </select>
                                </li>
                                <li id="celular_marca0">
                                    <label for="celelur_marca_name">Especifique a marca:</label>
                                    <input type="text" id="celular_marca_name" value=""/>
                                </li>
                                <li>
                                    <label for="celular_serie">N&uacute;mero de S&eacute;rie:</label>
                                    <input type="text" />
                                </li>
                                
                            </div>
                            
                            <div id="documento">
                                <li>
                                    <label for="documento_type">Tipo documento:</label>
                                    <select id="documento_type" name="documento_type" class="option">
                                        <option value="">-------Selecione------</option>
                                        <option value="RG">RG</option>
                                        <option value="1">Cadastro de Pessoa F&iacute;sica</option>
                                        <option value="2">Carteira de Motorista</option>
                                        <option value="3">Carteira de Trabalho</option>
                                        <option value="4">Carteira Profissional</option>
                                        <option value="5">T&iacute;tulo de Eleitor</option>
                                        <option value="6">Passaporte</option>
                                        <option value="7">Carteira do SUS</option>
                                        <!-- IMPLEMENTAR OS DEMAIS TIPOS DEPOIS!!! -->
                                        <option value="0">Outro</option>
                                    </select>
                                </li>
                                <li id="documento_type0">
                                    <label for="documento_name">Especifique o documento:</label>
                                    <input type="text" id="documento_name" value=""/>
                                </li>
                                <div id="rg_inform">
                                    <li>
                                        <label for="rg">N&uacute;mero do RG:</label>
                                        <input type="text" id="rg" value="<?php echo $user[0]['rg']?>" disabled="disabled" />
                                    </li>
                                    <li>
                                        <label for="rg">Expedido em:</label>
                                        <input type="text" id="rg" value="<?php echo $estado[0]['sigla']?>" maxlength="2" disabled="disabled" />
                                    </li>
                                </div>
                                <div id="docgeral_inform">
                                    <li>
                                        <label for="docgeral_number">N&uacute;mero do Documento:</label>
                                        <input type="text" id="docgeral_number" name="docgeral_number" value="" />
                                    </li>
                                    <li>
                                        <label for="docgeral_name">Nome:</label>
                                        <input type="text" id="docgeral_name" name="docgeral_name" value="" />
                                    </li>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div id="onde" class="conteudo">
                    	<li>
                        	<label for="setor1">Pr&eacute;dio:</label>
                            <select id="setor1" name="setor1">
                            	<option value="">--------Selecione--------</option>
                                <?php for ($i = 0; $i < sizeof($setor1); $i++): ?>
                        		<option value="<? echo $setor1[$i]['id']?>"><? echo $setor1[$i]['name'] ?></option>
                            	<?php endfor; ?>
                            </select>
                        </li>
                    </div>
            	</ul>
            </fieldset>
            <input type="hidden" name="flag" value="<?php echo $flag; ?>" />
            <input type="hidden" name="action" value="ocorrencia1e2_insert" />
            <input type="submit" id="inscricao" name="inscricao" value="Cadastrar-se" />
		</form>
    </div>
    <br />
    <br />
    <a href="index.php">Voltar para Index</a>


<?php include_once("../comum/rodape.php")?>